/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.ssm.changeunit.communicate;

import com.ssm.changeunit.ChangeUnitException;
/**
 *
 * @author EuiHyun
 */
public class GenerateXML {
    
    public String xmlForInit() throws ChangeUnitException {
        String xml= "<?xml version=\"1.0\" encoding=\"EUC-KR\"?>";
        
        DBToXML dBToXML = new DBToXML();
        
        xml += dBToXML.getXmlBranch();
        xml += dBToXML.getXmlChangeLog();
        xml += dBToXML.getXmlChangeUnit();
        xml += dBToXML.getXmlChangeUnitBranch();
        xml += dBToXML.getXmlChangeUnitItem();
        xml += dBToXML.getXmlChild();
        xml += dBToXML.getXmlManagedChangeUnit();
        xml += dBToXML.getXmlMangeItemList();
        xml += dBToXML.getXmlParent();
        xml += dBToXML.getXmlProject();
        xml += dBToXML.getXmlTag();
        
        return xml;
                
    }
    
    public String xmlForPull(String changeUnit) throws ChangeUnitException {
        String xml= "<?xml version=\"1.0\" encoding=\"EUC-KR\"?>";
        
        DBToXML dBToXML = new DBToXML();
        
        xml += dBToXML.getXmlBranch(changeUnit);
        xml += dBToXML.getXmlChangeLog(changeUnit);
        xml += dBToXML.getXmlChangeUnit(changeUnit);
        xml += dBToXML.getXmlChangeUnitBranch(changeUnit);
        xml += dBToXML.getXmlChangeUnitItem(changeUnit);
        xml += dBToXML.getXmlChild(changeUnit);
        xml += dBToXML.getXmlManagedChangeUnit();
        xml += dBToXML.getXmlMangeItemList();
        xml += dBToXML.getXmlParent(changeUnit);
        xml += dBToXML.getXmlProject();
        xml += dBToXML.getXmlTag(changeUnit);
        
        return xml;
    
    }
    
}
